<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Show Vacancy</title>
    </h:head>
    <h:body>
         <ui:composition template="/templates/template_admin.xhtml">
             <ui:define name="content">
                 <f:view>
                     <h:form>
                         <h1><h:outputText value="List"/></h1>
                         <p:dataTable id="dataTable" value="#{hrmb.vacancysearch()}" var="item" paginator="true" rows="5"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="3,5,10,15">
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="VacancyID"/>
                                 </f:facet>
                                 <h:outputText value="#{item.vacancyID}"/>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="Title"/>
                                 </f:facet>
                                 <h:outputText value="#{item.title}"/>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="CreatedDate"/>
                                 </f:facet>
                                 <h:outputText value="#{item.createdDate}">
                                     <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                                 </h:outputText>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="Status"/>
                                 </f:facet>
                                 <h:outputText value="#{item.status}"/>
                             </p:column>                             
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="Position"/>
                                 </f:facet>
                                 <h:outputText value="#{item.position}"/>
                             </p:column>     
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="MinimumSalary"/>
                                 </f:facet>
                                 <h:outputText value="#{item.minimumSalary}"/>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="MaximumSalary"/>
                                 </f:facet>
                                 <h:outputText value="#{item.maximumSalary}"/>
                             </p:column>                                                      
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="MinimumAge"/>
                                 </f:facet>
                                 <h:outputText value="#{item.minimumAge}"/>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="MaximumAge"/>
                                 </f:facet>
                                 <h:outputText value="#{item.maximumAge}"/>
                             </p:column>
                            <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="MaximumAge"/>
                                 </f:facet>
                                 <h:outputText value="#{item.maximumAge}"/>
                             </p:column>
                             <p:column>
                                 <f:facet name="header">
                                     <h:outputText value="Action"/>
                                 </f:facet>
                                 <h:commandLink value="View" action="#{hrmb.vacaView(item)}"/><br/>
                             </p:column>
                            
                         </p:dataTable>
                         <p:commandButton action="Search" value="Back"/>
                     </h:form>
                 </f:view>
             </ui:define>
         </ui:composition>
    </h:body>
</html>

